nested with laravel

28

Course::with('competencies', 'competencies.standards')->get()->toArray();
with('competencies.standards') is enough
$coursesAndComps = Course::with('competencies', 'competencies.standards')
                   ->get()->toArray();

Comments

Submit
0 Comments